﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using TowerDefence.LanguageExtensions;

namespace TowerDefence.Entities
{
    /// <summary>
    /// A sprite is a 2D image representing an entity
    /// that can be rendered to the screen.
    /// 
    /// TODO: is Form just data, or should it provide methods to render itself?
    /// </summary>
    public class Sprite : Form
    {
        public Texture2D Texture { get; set; }

        public void Render(SpriteBatch _spriteBatch)
        {
            _spriteBatch.Draw(
                this.Texture,
                Position,
                null,
                Color.White,
                Orientation.GetSpriteBatchAngle(),
                Vector2.Zero,
                1f,
                SpriteEffects.None,
                0f);
        }
    }
}
